#include <linux/module.h> 
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/platform_device.h>

static int driver_probe(struct platform_device *dev)
{
	printk("hello match ok!\n");
	return 0;
}

static int driver_remove(struct platform_device *dev)
{
	printk("hello_driver remove\n");
	return 0;
}

struct platform_driver test_driver = {
	.probe = driver_probe,
	.remove = driver_remove,
	.driver = {
		.name = "hello_device", 
	},
};

static int __init hello_driver_init(void)
{
	platform_driver_register(&test_driver);
	return 0;
}

static void __exit hello_driver_exit(void)
{
	platform_driver_unregister(&test_driver);
}

module_init(hello_driver_init);
module_exit(hello_driver_exit);
MODULE_LICENSE("Dual BSD/GPL");
